package com.itheima.service.impl;

import com.itheima.domain.User;
import com.itheima.mapper.UserMapper;
import com.itheima.service.UserSrvice;
import com.itheima.utils.MapperUtil;
import org.apache.ibatis.session.SqlSession;

public class UserServiceImpl implements UserSrvice {
    public User findById(Integer id) {
        SqlSession session = MapperUtil.getSession();
        UserMapper mapper = session.getMapper(UserMapper.class);
        User user = mapper.findById(id);
        return user;
    }
}
